package org.example.chapter3;

public class MultiplicationTable {
    public static void main(String[] args) {
        System.out.print("  ");
        for (int i = 1; i <= 9; i++) {
            System.out.printf("%4d",i);
        }
        System.out.println("\n----------------------------------------------");
        for (int i = 1; i <= 9; i++) {
            System.out.printf("%2s",(i+"|"));
            for (int j = 1; j <= 9; j++) {
                System.out.printf("%4d",i*j);
            }
            System.out.println();
        }
    }
}
